/* 情感化设计增强系统 */

/* ===== 微交互动画系统 ===== */

/* 情感化悬停效果 */
.emotion-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.emotion-hover:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

/* 按钮情感化点击效果 */
.btn-emotional {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-emotional::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  border-radius: 50%;
}

.btn-emotional:active::before {
  width: 300px;
  height: 300px;
}

.btn-emotional:active {
  transform: scale(0.95);
}

/* 卡片情感化悬停 */
.card-emotional {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.98) 100%);
}

.card-emotional:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 
    0 12px 28px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(59, 130, 246, 0.12);
}

/* ===== 愉悦的视觉反馈系统 ===== */

/* 成功状态情感化 */
.success-emotional {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
  animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* 加载状态情感化 */
.loading-emotional {
  background: linear-gradient(90deg, 
    #3b82f6 0%, #8b5cf6 25%, #ec4899 50%, #f59e0b 75%, #10b981 100%);
  background-size: 200% 100%;
  animation: emotionalShimmer 2s ease-in-out infinite;
}

@keyframes emotionalShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* 进度条情感化 */
.progress-emotional {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, 
    #3b82f6, #8b5cf6, #ec4899, #f59e0b, #10b981);
  background-size: 200% 100%;
  animation: progressFlow 3s linear infinite;
}

@keyframes progressFlow {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* ===== 个性化元素设计 ===== */

/* 用户头像情感化 */
.avatar-emotional {
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.avatar-emotional:hover {
  transform: rotate(8deg) scale(1.1);
  box-shadow: 
    0 12px 40px rgba(102, 126, 234, 0.4),
    0 4px 16px rgba(118, 75, 162, 0.3);
}

/* 时间相关的动态问候 */
.greeting-emotional {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.1) 0%, 
    rgba(139, 92, 246, 0.1) 50%, 
    rgba(236, 72, 153, 0.1) 100%);
  border-left: 4px solid #3b82f6;
  animation: greetingFade 2s ease-in-out;
}

@keyframes greetingFade {
  0% { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ===== 惊喜时刻设计 ===== */

/* 欢迎动画 */
.welcome-confetti {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  color: white;
  padding: 20px 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.4);
  animation: confettiPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 10000;
}

@keyframes confettiPop {
  0% { 
    opacity: 0; 
    transform: translateX(-50%) scale(0.5) rotate(-10deg); 
  }
  70% { 
    opacity: 1; 
    transform: translateX(-50%) scale(1.1) rotate(5deg); 
  }
  100% { 
    opacity: 1; 
    transform: translateX(-50%) scale(1) rotate(0deg); 
  }
}

/* 成就解锁效果 */
.achievement-emotional {
  animation: achievementUnlock 1.5s ease-in-out;
  background: radial-gradient(circle at center, 
    rgba(255, 215, 0, 0.2) 0%, 
    rgba(255, 165, 0, 0.1) 50%, 
    transparent 70%);
}

@keyframes achievementUnlock {
  0% { 
    transform: scale(0.8); 
    opacity: 0; 
  }
  50% { 
    transform: scale(1.1); 
    opacity: 1; 
  }
  100% { 
    transform: scale(1); 
    opacity: 1; 
  }
}

/* ===== 加载状态情感化 ===== */

/* 情感化骨架屏 */
.skeleton-emotional {
  background: linear-gradient(90deg, 
    rgba(248, 250, 252, 0.8) 25%, 
    rgba(226, 232, 240, 0.9) 50%, 
    rgba(248, 250, 252, 0.8) 75%);
  background-size: 200% 100%;
  animation: skeletonWave 2s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeletonWave {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* 空状态情感化 */
.empty-state-emotional {
  background: linear-gradient(135deg, 
    rgba(248, 250, 252, 0.9) 0%, 
    rgba(241, 245, 249, 0.95) 100%);
  border: 2px dashed rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  animation: emptyStateFade 1s ease-in-out;
}

@keyframes emptyStateFade {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.empty-state-emotional .empty-icon {
  font-size: 4rem;
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

/* ===== 季节/节日主题情感化 ===== */

/* 冬季主题 */
.theme-winter {
  --seasonal-accent: #38bdf8;
  --seasonal-bg: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.theme-winter .seasonal-element {
  background: var(--seasonal-bg);
  border: 1px solid var(--seasonal-accent);
}

/* 夏季主题 */
.theme-summer {
  --seasonal-accent: #f59e0b;
  --seasonal-bg: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
}

/* 节日主题 */
.theme-festival {
  --seasonal-accent: #dc2626;
  --seasonal-bg: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

/* ===== 微妙的音效反馈 ===== */

/* 通过CSS变量控制音效触发 */
.sound-feedback {
  --sound-trigger: 0;
  animation: soundTrigger 0.1s ease;
}

@keyframes soundTrigger {
  0% { --sound-trigger: 0; }
  100% { --sound-trigger: 1; }
}

/* ===== 情感化滚动条 ===== */

.emotional-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.emotional-scrollbar::-webkit-scrollbar-track {
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
}

.emotional-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.emotional-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  transform: scale(1.1);
}

/* ===== 情感化表单元素 ===== */

.input-emotional {
  transition: all 0.3s ease;
  border: 2px solid rgba(226, 232, 240, 0.8);
}

.input-emotional:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.input-emotional:valid {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

/* ===== 情感化通知系统 ===== */

.notification-emotional {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(248, 250, 252, 0.98) 100%);
  border-left: 4px solid #3b82f6;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  animation: notificationSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes notificationSlide {
  0% { 
    opacity: 0; 
    transform: translateX(100%) scale(0.9); 
  }
  100% { 
    opacity: 1; 
    transform: translateX(0) scale(1); 
  }
}

/* ===== 响应式情感化设计 ===== */

@media (max-width: 768px) {
  .emotional-hover-mobile {
    transition: transform 0.2s ease;
  }
  
  .emotional-hover-mobile:active {
    transform: scale(0.95);
  }
}

/* ===== 暗色主题情感化适配 ===== */

.dark .card-emotional {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.95) 0%, 
    rgba(15, 23, 42, 0.98) 100%);
}

.dark .empty-state-emotional {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.9) 0%, 
    rgba(15, 23, 42, 0.95) 100%);
  border-color: rgba(96, 165, 250, 0.3);
}

.dark .input-emotional {
  border-color: rgba(71, 85, 105, 0.8);
  background: rgba(30, 41, 59, 0.8);
}

.dark .input-emotional:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* ===== 情感化设计工具类 ===== */

/* 呼吸效果 */
.breathe {
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* 脉动效果 */
.pulse-emotional {
  animation: pulseEmotional 2s ease-in-out infinite;
}

@keyframes pulseEmotional {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); 
  }
  70% { 
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); 
  }
}

/* 摇摆效果 */
.wiggle {
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}

/* 弹跳效果 */
.bounce-emotional {
  animation: bounceEmotional 0.6s ease;
}

@keyframes bounceEmotional {
  0%, 20%, 53%, 80%, 100% {
    transform: translateY(0);
  }
  40%, 43% {
    transform: translateY(-8px);
  }
  70% {
    transform: translateY(-4px);
  }
  90% {
    transform: translateY(-2px);
  }
}